package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;

/**
 * 系统菜单信息对象 sys_menu
 *
 * @author yfkj
 * @date 2021-10-12
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysMenu extends com.ruoyi.common.core.web.domain.BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 系统菜单信息主键 */
    @TableField(exist = true)
    @ApiModelProperty(value =  "${comment}")
    private Long menuId;

    /** 菜单名称 */
    @com.ruoyi.common.core.annotation.Excel(name = "菜单名称")
    @TableField(exist = true)
    @ApiModelProperty(value =  "菜单名称")
    private String name;

    /** 父菜单ID */
    @com.ruoyi.common.core.annotation.Excel(name = "父菜单ID")
    @TableField(exist = true)
    @ApiModelProperty(value =  "父菜单ID")
    private Long parentId;

    /** 显示顺序 */
    @com.ruoyi.common.core.annotation.Excel(name = "显示顺序")
    @TableField(exist = true)
    @ApiModelProperty(value =  "显示顺序")
    private Integer orderNum;

    /** 路由地址 */
    @com.ruoyi.common.core.annotation.Excel(name = "路由地址")
    @TableField(exist = true)
    @ApiModelProperty(value =  "路由地址")
    private String path;

    /** 组件路径 */
    @com.ruoyi.common.core.annotation.Excel(name = "组件路径")
    @TableField(exist = true)
    @ApiModelProperty(value =  "组件路径")
    private String component;

    /** 路由参数 */
    @com.ruoyi.common.core.annotation.Excel(name = "路由参数")
    @TableField(exist = true)
    @ApiModelProperty(value =  "路由参数")
    private String query;

    /** 是否为外链(0是 1否) */
    @com.ruoyi.common.core.annotation.Excel(name = "是否为外链(0是 1否)")
    @TableField(exist = true)
    @ApiModelProperty(value =  "是否为外链(0是 1否)")
    private Integer isFrame;

    /** 是否缓存(0缓存 1不缓存) */
    @com.ruoyi.common.core.annotation.Excel(name = "是否缓存(0缓存 1不缓存)")
    @TableField(exist = true)
    @ApiModelProperty(value =  "是否缓存(0缓存 1不缓存)")
    private String isCache;

    /** 菜单类型(M目录 C菜单 F按钮) */
    @com.ruoyi.common.core.annotation.Excel(name = "菜单类型(M目录 C菜单 F按钮)")
    @TableField(exist = true)
    @ApiModelProperty(value =  "菜单类型(M目录 C菜单 F按钮)")
    private String menuType;

    /** 菜单显示状态(0显示 1隐藏) */
    @com.ruoyi.common.core.annotation.Excel(name = "菜单显示状态(0显示 1隐藏)")
    @TableField(exist = true)
    @ApiModelProperty(value =  "菜单显示状态(0显示 1隐藏)")
    private String visible;

    /** 菜单状态(0正常 1停用) */
    @com.ruoyi.common.core.annotation.Excel(name = "菜单状态(0正常 1停用)")
    @TableField(exist = true)
    @ApiModelProperty(value =  "菜单状态(0正常 1停用)")
    private String status;

    /** 权限标识 */
    @com.ruoyi.common.core.annotation.Excel(name = "权限标识")
    @TableField(exist = true)
    @ApiModelProperty(value =  "权限标识")
    private String perms;

    /** 菜单图标 */
    @com.ruoyi.common.core.annotation.Excel(name = "菜单图标")
    @TableField(exist = true)
    @ApiModelProperty(value =  "菜单图标")
    private String icon;

    @com.ruoyi.common.core.annotation.Excel(name = "权限拦截方法")
    @TableField(exist = true)
    @ApiModelProperty(value =  "权限拦截方法")
    private String access;

    @com.ruoyi.common.core.annotation.Excel(name = "显示或隐藏")
    @TableField(exist = true)
    @ApiModelProperty(value =  "显示或隐藏0是隐藏、1是显示")
    private Integer hideInMenu;

    @ApiModelProperty(value =  "是否为小程序菜单（0是、1否）")
    private Integer isApp;

    @TableField(exist = false)
    @ApiModelProperty(value =  "子列表")
    private List<SysMenu> children;

    public static final String MENU_ID="menu_id";
    public static final String NAME="name";
    public static final String PARENT_ID="parent_id";
    public static final String ORDER_NUM="order_num";
    public static final String PATH="path";
    public static final String COMPONENT="component";
    public static final String QUERY="query";
    public static final String IS_FRAME="is_frame";
    public static final String IS_CACHE="is_cache";
    public static final String MENU_TYPE="menu_type";
    public static final String VISIBLE="visible";
    public static final String STATUS="status";
    public static final String PERMS="perms";
    public static final String ICON="icon";
    public static final String ACCESS="access";
    public static final String CREATE_BY="create_by";
    public static final String CREATE_TIME="create_time";
    public static final String UPDATE_BY="update_by";
    public static final String UPDATE_TIME="update_time";
    public static final String REMARK="remark";
    public static final String IS_APP="is_app";
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("menuId", getMenuId())
                .append("name", getName())
                .append("parentId", getParentId())
                .append("orderNumber", getOrderNum())
                .append("path", getPath())
                .append("component", getComponent())
                .append("query", getQuery())
                .append("isFrame", getIsFrame())
                .append("isCache", getIsCache())
                .append("menuType", getMenuType())
                .append("visible", getVisible())
                .append("status", getStatus())
                .append("perms", getPerms())
                .append("icon", getIcon())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
